﻿CREATE TABLE [dbo].[hrm_ls_Districts] (
    [DistrictID]   INT            IDENTITY (1, 1) NOT NULL,
    [DistrictCode] NVARCHAR (50)  NOT NULL,
    [DistrictName] NVARCHAR (450) NULL,
    [ProvinceCode] NVARCHAR (50)  NULL,
    CONSTRAINT [PK_hrm_ls_Districts] PRIMARY KEY CLUSTERED ([DistrictID] ASC),
    CONSTRAINT [FK_hrm_ls_Districts_hrm_ls_Provinces] FOREIGN KEY ([ProvinceCode]) REFERENCES [dbo].[hrm_ls_Provinces] ([ProvinceCode]) ON UPDATE CASCADE
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_hrm_ls_Districts]
    ON [dbo].[hrm_ls_Districts]([DistrictCode] ASC);

